﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Retete.Models;
using System.Globalization;

namespace Retete.ViewModels
{
    public class ReceptiiViewModel
    {
        public List<Receptie> Receptii { get; set; }
        public int IDReceptieStearsa { get; set; }
        public DateTime SelectedDate { get; set; }
        public string Titlu
        {
            get
            {
                if (SelectedDate.Date == DateTime.Today) return "Lista receptiilor de azi";
                else return "Lista receptiilor din " + SelectedDate.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
            }
        }

        public ReceptiiViewModel(List<Receptie> setReceptii)
        {
            Receptii = setReceptii;
            IDReceptieStearsa = -1;
        }
        public ReceptiiViewModel() { }
    }
}